program sushu
var a,i:integer;
flag:bool;
begin
read(a);
flag:=true;
for i:=2 to a do
 if (a mod i =0)
  then begin flag:=false;break end;
 if (flag)
   then write('Y')
   else 
   write('N')
end